package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzy
 * @since 2022-06-02 15:36:46
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_auth_user_oauth")
@ApiModel(value = "SpiderAuthUserOauthEntity对象", description = "")
public class SpiderAuthUserOauthEntity extends Model<SpiderAuthUserOauthEntity> {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("租户id")
    @TableField("tenant_id")
    private Long tenantId;

    @ApiModelProperty("第三方系统用户id")
    @TableField("oauth_id")
    private String oauthId;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("用户名称")
    @TableField("oauth_username")
    private String oauthUsername;

    @ApiModelProperty("用户昵称")
    @TableField("oauth_nickname")
    private String oauthNickname;

    @ApiModelProperty("用户头像")
    @TableField("oauth_icon")
    private String oauthIcon;

    @ApiModelProperty("应用主页")
    @TableField("oauth_blog")
    private String oauthBlog;

    @ApiModelProperty("用户公司")
    @TableField("oauth_company")
    private String oauthCompany;

    @ApiModelProperty("用户来源")
    @TableField("oauth_source")
    private String oauthSource;

    @ApiModelProperty("用户所在地")
    @TableField("oauth_location")
    private String oauthLocation;

    @ApiModelProperty("邮箱地址")
    @TableField("oauth_email")
    private String oauthEmail;

    @ApiModelProperty("备注")
    @TableField("oauth_remark")
    private String oauthRemark;

    @ApiModelProperty("用户性别，0：未知；1：男；2：女")
    @TableField("oauth_gender")
    private Integer oauthGender;

    @ApiModelProperty("第三方系统权限id")
    @TableField("oauth_status")
    private Integer oauthStatus;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
